package org.nanfang.test14;
//第二个线程
public class TwoThreald extends Thread{
    //第二把锁
    public static final Object Two_Lock = new Object();
    @Override
    public void run() {
        synchronized (Two_Lock){
            System.out.printf("获取第二把锁%s,执行相关的业务代码 %n","Two_Lock");


            synchronized (OneThreald.ONE_Lock){
                System.out.printf("获取第一把锁%s,执行相关的业务代码 %n","One_Lock");
            }
        }
    }
}
